package cn.baimo.mapper;

import cn.baimo.pojo.HospitalDoctorNumber;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface HospitalDoctorNumberMapper {
    //查询医生数量
    @Select("select COUNT(d.id) num,h.`name` `name` from doctor d,hospital_division hd,hospital h where d.id=hd.did and hd.hid=h.id GROUP BY h.`name`")
    List<HospitalDoctorNumber> selectHospitalDoctorNumber();
}
